﻿using Morus;
using Morus.Infrastructure;

namespace KAKA.Repository
{
    public sealed class DatabaseUnitOfWork : Disposable, IUnitOfWork
    {
        private Database Database { get; set; }

        public DatabaseUnitOfWork(Database database)
        {
            Check.Argument.IsNotNull(database, "database");

            Database = database;
        }

        public void Commit()
        {
            Database.SaveChanges();
        }
    }
}
